<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #main{
            width: fit-content;
            margin:0px auto;
        }
        button{
            margin:2px;
            width:60px;
            height: 30px;
            border:1px solid blue;
        }
        button:hover{
            background-color: blue;
        }
    </style>

</head>


<body>
    <div id="main">

    </div>
    <script>
        function get(){
            //获取按钮表
            let ans="";
            for(let i=1;i<=9;i++){
                for(let j=1;j<=i;j++){
                    ans+="<button class='b'>"+i+"x"+j+"="+i*j+"</button>"
                }
                ans+="<br>"
            }
            return ans;
        }
        a=document.getElementById("main");
        a.innerHTML+=get();
    </script>

</body>
</html>